<html>

<head>
    <title>登录</title>
    <meta name="decorator" content="default" />
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <style>
        form {
            margin: auto;
            width: 500px;
            color: white;
            border: 1px solid white;
            border-radius: 10px;
            background-color: rgba(255, 255, 255, 0.5);
        }
        
        .title {
            margin-top: 20px;
            margin-bottom: 20px;
            font-size: 30px;
        }
        
        input {
            width: 400px;
            height: 40px;
            background-color: rgba(255, 255, 255, 0.2);
            padding-left: 5px;
            border-radius: 5px;
            color: white;
        }
        
        button {
            width: 100px;
            height: 30px;
            margin-bottom: 20px;
        }
        
        form a {
            display: block;
            margin-bottom: 10px;
            cursor: pointer;
        }
        
        .error {
            font-size: 14px;
            color: red;
            height: 20px;
        }
    </style>
</head>

<body>
    <form>
        <!--表单名称-->
        <div class="title">Register Now</div>
        <!--用户名-->
        <input class="username" placeholder="User name" v-model="username" />
        <!--错误提示，下同-->
        <div class="error">{{uError}}</div>
        <!--密码-->
        <input class="password" placeholder="Password" v-model="userpwd" />
        <div class="error">{{pError}}</div>
        <!--确认密码-->
        <input class="pwdagain" placeholder="Confirm Password" v-model="pwdagain" />
        <div class="error">{{aError}}</div>
        <!--注册按钮-->
        <button class="register-btn" @click="userRegister">Register</button>
        <!--这里我们用路由跳转到登陆组件-->
        <router-link to="/Login">已有账号，登陆</router-link>
    </form>
    <script>
        $(document).ready(function() {
            $(".js-nav-title li").click(function() {
                $(this).attr("class", "on");
                $(this).siblings().attr("class", "");
                var index = $(".js-nav-title li").index(this);
                $(".index-news-list").css("display", "none");
                $("#index-news-list-" + (index + 1)).css("display", "block");
            });
        });
    </script>
</body>

</html>